3.1.2 \(\int (d+e x)^3 (a+b \arctan (c x)) \, dx\) [2]

3.1.2.1 Optimal result
3.1.2.2 Mathematica [A] (verified)
3.1.2.3 Rubi [A] (verified)
3.1.2.4 Maple [A] (verified)
3.1.2.5 Fricas [A] (verification not implemented)
3.1.2.6 Sympy [B] (verification not implemented)
3.1.2.7 Maxima [A] (verification not implemented)
3.1.2.8 Giac [F]
3.1.2.9 Mupad [B] (verification not implemented)

3.1.2.1 Optimal result

Integrand size = 16, antiderivative size = 144 \[ \int (d+e x)^3 (a+b \arctan (c x)) \, dx=-\frac {b e \left (6 c^2 d^2-e^2\right ) x}{4 c^3}-\frac {b d e^2 x^2}{2 c}-\frac {b e^3 x^3}{12 c}-\frac {b \left (c^4 d^4-6 c^2 d^2 e^2+e^4\right ) \arctan (c x)}{4 c^4 e}+\frac {(d+e x)^4 (a+b \arctan (c x))}{4 e}-\frac {b d (c d-e) (c d+e) \log \left (1+c^2 x^2\right )}{2 c^3} \]

output
-1/4*b*e*(6*c^2*d^2-e^2)*x/c^3-1/2*b*d*e^2*x^2/c-1/12*b*e^3*x^3/c-1/4*b*(c 
^4*d^4-6*c^2*d^2*e^2+e^4)*arctan(c*x)/c^4/e+1/4*(e*x+d)^4*(a+b*arctan(c*x) 
)/e-1/2*b*d*(c*d-e)*(c*d+e)*ln(c^2*x^2+1)/c^3
 
3.1.2.2 Mathematica [A] (verified)

Time = 0.48 (sec) , antiderivative size = 218, normalized size of antiderivative = 1.51 \[ \int (d+e x)^3 (a+b \arctan (c x)) \, dx=\frac {(d+e x)^4 (a+b \arctan (c x))-\frac {b c \left (2 \sqrt {-c^2} e^2 x \left (-3 e^2+c^2 \left (18 d^2+6 d e x+e^2 x^2\right )\right )-3 \left (c^4 d^4+e^3 \left (4 \sqrt {-c^2} d+e\right )-2 c^2 d^2 e \left (2 \sqrt {-c^2} d+3 e\right )\right ) \log \left (1-\sqrt {-c^2} x\right )+3 \left (c^4 d^4+2 c^2 d^2 \left (2 \sqrt {-c^2} d-3 e\right ) e+e^3 \left (-4 \sqrt {-c^2} d+e\right )\right ) \log \left (1+\sqrt {-c^2} x\right )\right )}{6 \left (-c^2\right )^{5/2}}}{4 e} \]

input
Integrate[(d + e*x)^3*(a + b*ArcTan[c*x]),x]
 
output
((d + e*x)^4*(a + b*ArcTan[c*x]) - (b*c*(2*Sqrt[-c^2]*e^2*x*(-3*e^2 + c^2* 
(18*d^2 + 6*d*e*x + e^2*x^2)) - 3*(c^4*d^4 + e^3*(4*Sqrt[-c^2]*d + e) - 2* 
c^2*d^2*e*(2*Sqrt[-c^2]*d + 3*e))*Log[1 - Sqrt[-c^2]*x] + 3*(c^4*d^4 + 2*c 
^2*d^2*(2*Sqrt[-c^2]*d - 3*e)*e + e^3*(-4*Sqrt[-c^2]*d + e))*Log[1 + Sqrt[ 
-c^2]*x]))/(6*(-c^2)^(5/2)))/(4*e)
 
3.1.2.3 Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 139, normalized size of antiderivative = 0.97, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {5387, 478, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (d+e x)^3 (a+b \arctan (c x)) \, dx\)

\(\Big \downarrow \) 5387

\(\displaystyle \frac {(d+e x)^4 (a+b \arctan (c x))}{4 e}-\frac {b c \int \frac {(d+e x)^4}{c^2 x^2+1}dx}{4 e}\)

\(\Big \downarrow \) 478

\(\displaystyle \frac {(d+e x)^4 (a+b \arctan (c x))}{4 e}-\frac {b c \int \left (\frac {x^2 e^4}{c^2}+\frac {4 d x e^3}{c^2}+\frac {\left (6 c^2 d^2-e^2\right ) e^2}{c^4}+\frac {c^4 d^4-6 c^2 e^2 d^2+4 c^2 (c d-e) e (c d+e) x d+e^4}{c^4 \left (c^2 x^2+1\right )}\right )dx}{4 e}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {(d+e x)^4 (a+b \arctan (c x))}{4 e}-\frac {b c \left (\frac {\arctan (c x) \left (c^4 d^4-6 c^2 d^2 e^2+e^4\right )}{c^5}+\frac {2 d e^3 x^2}{c^2}+\frac {e^4 x^3}{3 c^2}+\frac {e^2 x \left (6 c^2 d^2-e^2\right )}{c^4}+\frac {2 d e (c d-e) (c d+e) \log \left (c^2 x^2+1\right )}{c^4}\right )}{4 e}\)

input
Int[(d + e*x)^3*(a + b*ArcTan[c*x]),x]
 
output
((d + e*x)^4*(a + b*ArcTan[c*x]))/(4*e) - (b*c*((e^2*(6*c^2*d^2 - e^2)*x)/ 
c^4 + (2*d*e^3*x^2)/c^2 + (e^4*x^3)/(3*c^2) + ((c^4*d^4 - 6*c^2*d^2*e^2 + 
e^4)*ArcTan[c*x])/c^5 + (2*d*(c*d - e)*e*(c*d + e)*Log[1 + c^2*x^2])/c^4)) 
/(4*e)
 

3.1.2.3.1 Defintions of rubi rules used

rule 478
Int[((c_) + (d_.)*(x_))^(n_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Int[Expand 
Integrand[(c + d*x)^n/(a + b*x^2), x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ 
[n, 1]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 5387
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] 
 :> Simp[(d + e*x)^(q + 1)*((a + b*ArcTan[c*x])/(e*(q + 1))), x] - Simp[b*( 
c/(e*(q + 1)))   Int[(d + e*x)^(q + 1)/(1 + c^2*x^2), x], x] /; FreeQ[{a, b 
, c, d, e, q}, x] && NeQ[q, -1]
 
3.1.2.4 Maple [A] (verified)

Time = 1.48 (sec) , antiderivative size = 191, normalized size of antiderivative = 1.33

method result size
parts \(\frac {a \left (e x +d \right )^{4}}{4 e}+\frac {b \left (\frac {c \,e^{3} \arctan \left (c x \right ) x^{4}}{4}+c \,e^{2} \arctan \left (c x \right ) x^{3} d +\frac {3 c e \arctan \left (c x \right ) x^{2} d^{2}}{2}+\arctan \left (c x \right ) c x \,d^{3}+\frac {c \arctan \left (c x \right ) d^{4}}{4 e}-\frac {6 c^{3} d^{2} e^{2} x +2 e^{3} c^{3} d \,x^{2}+\frac {e^{4} c^{3} x^{3}}{3}-c \,e^{4} x +\frac {\left (4 c^{3} d^{3} e -4 c d \,e^{3}\right ) \ln \left (c^{2} x^{2}+1\right )}{2}+\left (c^{4} d^{4}-6 c^{2} d^{2} e^{2}+e^{4}\right ) \arctan \left (c x \right )}{4 c^{3} e}\right )}{c}\) \(191\)
derivativedivides \(\frac {\frac {a \left (c e x +c d \right )^{4}}{4 c^{3} e}+\frac {b \left (\frac {\arctan \left (c x \right ) c^{4} d^{4}}{4 e}+\arctan \left (c x \right ) c^{4} d^{3} x +\frac {3 e \arctan \left (c x \right ) c^{4} d^{2} x^{2}}{2}+e^{2} \arctan \left (c x \right ) c^{4} d \,x^{3}+\frac {e^{3} \arctan \left (c x \right ) c^{4} x^{4}}{4}-\frac {6 c^{3} d^{2} e^{2} x +2 e^{3} c^{3} d \,x^{2}+\frac {e^{4} c^{3} x^{3}}{3}-c \,e^{4} x +\frac {\left (4 c^{3} d^{3} e -4 c d \,e^{3}\right ) \ln \left (c^{2} x^{2}+1\right )}{2}+\left (c^{4} d^{4}-6 c^{2} d^{2} e^{2}+e^{4}\right ) \arctan \left (c x \right )}{4 e}\right )}{c^{3}}}{c}\) \(208\)
default \(\frac {\frac {a \left (c e x +c d \right )^{4}}{4 c^{3} e}+\frac {b \left (\frac {\arctan \left (c x \right ) c^{4} d^{4}}{4 e}+\arctan \left (c x \right ) c^{4} d^{3} x +\frac {3 e \arctan \left (c x \right ) c^{4} d^{2} x^{2}}{2}+e^{2} \arctan \left (c x \right ) c^{4} d \,x^{3}+\frac {e^{3} \arctan \left (c x \right ) c^{4} x^{4}}{4}-\frac {6 c^{3} d^{2} e^{2} x +2 e^{3} c^{3} d \,x^{2}+\frac {e^{4} c^{3} x^{3}}{3}-c \,e^{4} x +\frac {\left (4 c^{3} d^{3} e -4 c d \,e^{3}\right ) \ln \left (c^{2} x^{2}+1\right )}{2}+\left (c^{4} d^{4}-6 c^{2} d^{2} e^{2}+e^{4}\right ) \arctan \left (c x \right )}{4 e}\right )}{c^{3}}}{c}\) \(208\)
parallelrisch \(-\frac {-3 x^{4} \arctan \left (c x \right ) b \,c^{4} e^{3}-3 x^{4} a \,c^{4} e^{3}-12 x^{3} \arctan \left (c x \right ) b \,c^{4} d \,e^{2}-12 x^{3} a \,c^{4} d \,e^{2}-18 x^{2} \arctan \left (c x \right ) b \,c^{4} d^{2} e +x^{3} b \,c^{3} e^{3}-18 x^{2} a \,c^{4} d^{2} e -12 b \,d^{3} \arctan \left (c x \right ) x \,c^{4}+6 x^{2} b \,c^{3} d \,e^{2}-12 x a \,c^{4} d^{3}+6 \ln \left (c^{2} x^{2}+1\right ) b \,c^{3} d^{3}+18 x b \,c^{3} d^{2} e -18 \arctan \left (c x \right ) b \,c^{2} d^{2} e -6 \ln \left (c^{2} x^{2}+1\right ) b c d \,e^{2}-3 x b c \,e^{3}+3 \arctan \left (c x \right ) b \,e^{3}}{12 c^{4}}\) \(223\)
risch \(\frac {3 i e b \,d^{2} x^{2} \ln \left (-i c x +1\right )}{4}+\frac {i e^{3} b \,x^{4} \ln \left (-i c x +1\right )}{8}+\frac {i b \,d^{3} x \ln \left (-i c x +1\right )}{2}-\frac {i \left (e x +d \right )^{4} b \ln \left (i c x +1\right )}{8 e}+\frac {i b \,d^{4} \ln \left (c^{2} x^{2}+1\right )}{16 e}-\frac {b \,d^{4} \arctan \left (c x \right )}{8 e}+\frac {e^{2} b d \ln \left (c^{2} x^{2}+1\right )}{2 c^{3}}+\frac {i e^{2} b d \,x^{3} \ln \left (-i c x +1\right )}{2}-\frac {b \,d^{3} \ln \left (c^{2} x^{2}+1\right )}{2 c}+\frac {3 e b \,d^{2} \arctan \left (c x \right )}{2 c^{2}}-\frac {b d \,e^{2} x^{2}}{2 c}-\frac {3 e b \,d^{2} x}{2 c}-\frac {e^{3} b \arctan \left (c x \right )}{4 c^{4}}+\frac {x^{4} e^{3} a}{4}-\frac {b \,e^{3} x^{3}}{12 c}+\frac {e^{3} b x}{4 c^{3}}+x^{3} e^{2} d a +\frac {3 x^{2} e \,d^{2} a}{2}+x \,d^{3} a\) \(275\)

input
int((e*x+d)^3*(a+b*arctan(c*x)),x,method=_RETURNVERBOSE)
 
output
1/4*a*(e*x+d)^4/e+b/c*(1/4*c*e^3*arctan(c*x)*x^4+c*e^2*arctan(c*x)*x^3*d+3 
/2*c*e*arctan(c*x)*x^2*d^2+arctan(c*x)*c*x*d^3+1/4*c/e*arctan(c*x)*d^4-1/4 
/c^3/e*(6*c^3*d^2*e^2*x+2*e^3*c^3*d*x^2+1/3*e^4*c^3*x^3-c*e^4*x+1/2*(4*c^3 
*d^3*e-4*c*d*e^3)*ln(c^2*x^2+1)+(c^4*d^4-6*c^2*d^2*e^2+e^4)*arctan(c*x)))
 
3.1.2.5 Fricas [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 196, normalized size of antiderivative = 1.36 \[ \int (d+e x)^3 (a+b \arctan (c x)) \, dx=\frac {3 \, a c^{4} e^{3} x^{4} + {\left (12 \, a c^{4} d e^{2} - b c^{3} e^{3}\right )} x^{3} + 6 \, {\left (3 \, a c^{4} d^{2} e - b c^{3} d e^{2}\right )} x^{2} + 3 \, {\left (4 \, a c^{4} d^{3} - 6 \, b c^{3} d^{2} e + b c e^{3}\right )} x + 3 \, {\left (b c^{4} e^{3} x^{4} + 4 \, b c^{4} d e^{2} x^{3} + 6 \, b c^{4} d^{2} e x^{2} + 4 \, b c^{4} d^{3} x + 6 \, b c^{2} d^{2} e - b e^{3}\right )} \arctan \left (c x\right ) - 6 \, {\left (b c^{3} d^{3} - b c d e^{2}\right )} \log \left (c^{2} x^{2} + 1\right )}{12 \, c^{4}} \]

input
integrate((e*x+d)^3*(a+b*arctan(c*x)),x, algorithm="fricas")
 
output
1/12*(3*a*c^4*e^3*x^4 + (12*a*c^4*d*e^2 - b*c^3*e^3)*x^3 + 6*(3*a*c^4*d^2* 
e - b*c^3*d*e^2)*x^2 + 3*(4*a*c^4*d^3 - 6*b*c^3*d^2*e + b*c*e^3)*x + 3*(b* 
c^4*e^3*x^4 + 4*b*c^4*d*e^2*x^3 + 6*b*c^4*d^2*e*x^2 + 4*b*c^4*d^3*x + 6*b* 
c^2*d^2*e - b*e^3)*arctan(c*x) - 6*(b*c^3*d^3 - b*c*d*e^2)*log(c^2*x^2 + 1 
))/c^4
 
3.1.2.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 262 vs. \(2 (129) = 258\).

Time = 0.37 (sec) , antiderivative size = 262, normalized size of antiderivative = 1.82 \[ \int (d+e x)^3 (a+b \arctan (c x)) \, dx=\begin {cases} a d^{3} x + \frac {3 a d^{2} e x^{2}}{2} + a d e^{2} x^{3} + \frac {a e^{3} x^{4}}{4} + b d^{3} x \operatorname {atan}{\left (c x \right )} + \frac {3 b d^{2} e x^{2} \operatorname {atan}{\left (c x \right )}}{2} + b d e^{2} x^{3} \operatorname {atan}{\left (c x \right )} + \frac {b e^{3} x^{4} \operatorname {atan}{\left (c x \right )}}{4} - \frac {b d^{3} \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{2 c} - \frac {3 b d^{2} e x}{2 c} - \frac {b d e^{2} x^{2}}{2 c} - \frac {b e^{3} x^{3}}{12 c} + \frac {3 b d^{2} e \operatorname {atan}{\left (c x \right )}}{2 c^{2}} + \frac {b d e^{2} \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{2 c^{3}} + \frac {b e^{3} x}{4 c^{3}} - \frac {b e^{3} \operatorname {atan}{\left (c x \right )}}{4 c^{4}} & \text {for}\: c \neq 0 \\a \left (d^{3} x + \frac {3 d^{2} e x^{2}}{2} + d e^{2} x^{3} + \frac {e^{3} x^{4}}{4}\right ) & \text {otherwise} \end {cases} \]

input
integrate((e*x+d)**3*(a+b*atan(c*x)),x)
 
output
Piecewise((a*d**3*x + 3*a*d**2*e*x**2/2 + a*d*e**2*x**3 + a*e**3*x**4/4 + 
b*d**3*x*atan(c*x) + 3*b*d**2*e*x**2*atan(c*x)/2 + b*d*e**2*x**3*atan(c*x) 
 + b*e**3*x**4*atan(c*x)/4 - b*d**3*log(x**2 + c**(-2))/(2*c) - 3*b*d**2*e 
*x/(2*c) - b*d*e**2*x**2/(2*c) - b*e**3*x**3/(12*c) + 3*b*d**2*e*atan(c*x) 
/(2*c**2) + b*d*e**2*log(x**2 + c**(-2))/(2*c**3) + b*e**3*x/(4*c**3) - b* 
e**3*atan(c*x)/(4*c**4), Ne(c, 0)), (a*(d**3*x + 3*d**2*e*x**2/2 + d*e**2* 
x**3 + e**3*x**4/4), True))
 
3.1.2.7 Maxima [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 186, normalized size of antiderivative = 1.29 \[ \int (d+e x)^3 (a+b \arctan (c x)) \, dx=\frac {1}{4} \, a e^{3} x^{4} + a d e^{2} x^{3} + \frac {3}{2} \, a d^{2} e x^{2} + \frac {3}{2} \, {\left (x^{2} \arctan \left (c x\right ) - c {\left (\frac {x}{c^{2}} - \frac {\arctan \left (c x\right )}{c^{3}}\right )}\right )} b d^{2} e + \frac {1}{2} \, {\left (2 \, x^{3} \arctan \left (c x\right ) - c {\left (\frac {x^{2}}{c^{2}} - \frac {\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b d e^{2} + \frac {1}{12} \, {\left (3 \, x^{4} \arctan \left (c x\right ) - c {\left (\frac {c^{2} x^{3} - 3 \, x}{c^{4}} + \frac {3 \, \arctan \left (c x\right )}{c^{5}}\right )}\right )} b e^{3} + a d^{3} x + \frac {{\left (2 \, c x \arctan \left (c x\right ) - \log \left (c^{2} x^{2} + 1\right )\right )} b d^{3}}{2 \, c} \]

input
integrate((e*x+d)^3*(a+b*arctan(c*x)),x, algorithm="maxima")
 
output
1/4*a*e^3*x^4 + a*d*e^2*x^3 + 3/2*a*d^2*e*x^2 + 3/2*(x^2*arctan(c*x) - c*( 
x/c^2 - arctan(c*x)/c^3))*b*d^2*e + 1/2*(2*x^3*arctan(c*x) - c*(x^2/c^2 - 
log(c^2*x^2 + 1)/c^4))*b*d*e^2 + 1/12*(3*x^4*arctan(c*x) - c*((c^2*x^3 - 3 
*x)/c^4 + 3*arctan(c*x)/c^5))*b*e^3 + a*d^3*x + 1/2*(2*c*x*arctan(c*x) - l 
og(c^2*x^2 + 1))*b*d^3/c
 
3.1.2.8 Giac [F]

\[ \int (d+e x)^3 (a+b \arctan (c x)) \, dx=\int { {\left (e x + d\right )}^{3} {\left (b \arctan \left (c x\right ) + a\right )} \,d x } \]

input
integrate((e*x+d)^3*(a+b*arctan(c*x)),x, algorithm="giac")
 
output
sage0*x
 
3.1.2.9 Mupad [B] (verification not implemented)

Time = 0.87 (sec) , antiderivative size = 197, normalized size of antiderivative = 1.37 \[ \int (d+e x)^3 (a+b \arctan (c x)) \, dx=\frac {a\,e^3\,x^4}{4}+a\,d^3\,x-\frac {b\,d^3\,\ln \left (c^2\,x^2+1\right )}{2\,c}-\frac {b\,e^3\,x^3}{12\,c}+b\,d^3\,x\,\mathrm {atan}\left (c\,x\right )+\frac {3\,a\,d^2\,e\,x^2}{2}+a\,d\,e^2\,x^3+\frac {b\,e^3\,x}{4\,c^3}-\frac {b\,e^3\,\mathrm {atan}\left (c\,x\right )}{4\,c^4}+\frac {b\,e^3\,x^4\,\mathrm {atan}\left (c\,x\right )}{4}-\frac {3\,b\,d^2\,e\,x}{2\,c}+\frac {3\,b\,d^2\,e\,\mathrm {atan}\left (c\,x\right )}{2\,c^2}+\frac {3\,b\,d^2\,e\,x^2\,\mathrm {atan}\left (c\,x\right )}{2}+b\,d\,e^2\,x^3\,\mathrm {atan}\left (c\,x\right )+\frac {b\,d\,e^2\,\ln \left (c^2\,x^2+1\right )}{2\,c^3}-\frac {b\,d\,e^2\,x^2}{2\,c} \]

input
int((a + b*atan(c*x))*(d + e*x)^3,x)
 
output
(a*e^3*x^4)/4 + a*d^3*x - (b*d^3*log(c^2*x^2 + 1))/(2*c) - (b*e^3*x^3)/(12 
*c) + b*d^3*x*atan(c*x) + (3*a*d^2*e*x^2)/2 + a*d*e^2*x^3 + (b*e^3*x)/(4*c 
^3) - (b*e^3*atan(c*x))/(4*c^4) + (b*e^3*x^4*atan(c*x))/4 - (3*b*d^2*e*x)/ 
(2*c) + (3*b*d^2*e*atan(c*x))/(2*c^2) + (3*b*d^2*e*x^2*atan(c*x))/2 + b*d* 
e^2*x^3*atan(c*x) + (b*d*e^2*log(c^2*x^2 + 1))/(2*c^3) - (b*d*e^2*x^2)/(2* 
c)